package screens;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;

import core.UIController;

public class VendasFuncionarioCanvas extends AbstractVendasCanvas implements
		CommandListener {

	private static VendasFuncionarioCanvas instance;

	private Command commandVoltar;

	private VendasFuncionarioCanvas() {
		super();

		this.commandVoltar = new Command("Voltar", Command.BACK, 1);
		this.setCommandListener(this);

		this.addCommand(commandVoltar);
	}

	public static VendasFuncionarioCanvas getInstance() {
		if (instance == null) {
			instance = new VendasFuncionarioCanvas();
		}
		return instance;
	}

	public void commandAction(Command command, Displayable displayable) {
		try {
			if (command.equals(commandVoltar)) {
				UIController.getInstance().voltar();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
